﻿<%@ Page Theme="" Language="C#" AutoEventWireup="true" CodeBehind="DefaultN.aspx.cs"
Inherits="Web.DefaultN" %>

<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>
<%@ Import Namespace="Platform.Permission" %>

<%@ Register Src="Controls/LeftMenuNControl.ascx" TagName="LeftMenuNControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html>
<head>
    <title>上海市取、用水收费和业务管理系统</title>
   <%--<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=8" />--%>
    <script src="/JS/jquery-1.11.1.min.js" type="text/javascript"></script>
    <script src="/JS/jquery-ui.js" type="text/javascript"></script>
    <link href="/css/jquery-ui.css" rel="stylesheet" type="text/css"/>
    <script src="/JS/layer/layer.js"></script>
    <script src="JS/My97DatePicker/WdatePicker.js" type="text/javascript"
            charset="gb2312"></script>
    <script src="/JS/jquery.layout-latest.js"></script>
     <script type="text/javascript">
         $(document).ready(function () {
           
         });
    </script>

    <script type="text/javascript">
        function wOpen() {
            if (window.confirm('你真的要退出吗?')) {

                $.ajax({
                    type: "post",
                    cache: false,
                    async: false,
                    url: "/ashx/XT/XT.ashx",
                    data: {
                        "op": "logout" 
                    },
                    dataType: "json",
                    success: function (rs) { 
                    },
                    error: function (error) {
                    
                    }
                });
                logout();
                //    $('#ttv').val('1');
                //   btnLogOut.onClick();

                //var winObj = window.open('login.aspx', 'newwin', 'left=0,top=0,resizable=1,toolbar=no,menubar=no,scrollbars=no,status=no,location=no');
                //window.opener = null;
                //window.open('', '_self', '');
                //window.close();
            }
        }
        function logout()
        {
            //var winObj = window.open('login.aspx', 'newwin', 'left=0,top=0,resizable=1,toolbar=no,menubar=no,scrollbars=no,status=no,location=no');
             window.opener = null; 
            //window.location.href = null;
           // alert('已退出！');
            window.location.href = "login.aspx";
        }

        $(function() {
            var week = new Array("星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六");
            $("#spTime").append(" " + week[<%= Convert.ToInt16(DateTime.Now.DayOfWeek) %>]);

            function winMax() {
                self.moveTo(0, 0);
                self.resizeTo(screen.availWidth, screen.availHeight);
            }

            if (window.location.href.indexOf('max') > 0) {
                winMax();
            };


        });
        $(function() {
            function getExplorer() {
                var explorer = window.navigator.userAgent;
                if (explorer.indexOf("MSIE") >= 0) {
                    return "ie";
                } else if (explorer.indexOf("Firefox") >= 0) {
                    return "Firefox";
                } else if (explorer.indexOf("Chrome") >= 0) {
                    return "Chrome";
                } else if (explorer.indexOf("Opera") >= 0) {
                    return "Opera";
                } else if (explorer.indexOf("Safari") >= 0) {
                    return "Safari";
                }
                var isIE11 = (window.navigator.userAgent.toLowerCase().indexOf("trident") > -1 && window.navigator.userAgent.indexOf("rv") > -1);
                if (isIE11) {
                    return "ie";
                }

            }

            function ie8() {
                if (getExplorer() == "ie") {
                    var version = navigator.appVersion.split(";")[1];
                    var versingB = version.substring(6, version.length);
                    return versingB <= 8 && versingB.length > 0;
                } else {
                    return false;
                }
            }

            function cssInit() {
                if (ie8()) {
                    $("head").append("<link href='css/DefualtNCSS2.css' rel='stylesheet' type='text/css' />");
                    $("head").append("<script src='JS/DefualtNCSS2.js' type='text/javascript' />");
                } 
                else {
                    $("head").append("<link href='css/DefualtNCSS3.css' rel='stylesheet' type='text/css' />");
                    $("head").append("<script src='JS/DefualtNCSS3.js' type='text/javascript' />");
                }
            }


            cssInit();
        }); 
    </script>
    <style>
      
    </style>
    <script type="text/javascript">
        $(function() {
            $('body').layout({ applyDemoStyles: true });
            $("#toolsBar").draggable({ handle: ".tbHandle" });
            $("#tbHid").click(function() {
                $(this).toggleClass("tbHidOpen").toggleClass("tbHidClose");
                $("#tbContent").toggle("normal", "swing");
            });
            $("#oInfo").click(function() {
                layer.open({
                    type: 2,
                    title: '  ',
                    shadeClose: false,
                    shade: 0.8,
                    area: ['800px', '600px'],
                    content:"/AuthorizationSystem/ShiYongDWXX.aspx"
                });
            });
            $("#oPass").click(function() {
                layer.open({
                    type: 2,
                    title: '  ',
                    shadeClose: false,
                    shade: 0.8,
                    area: ['800px', '600px'],
                    content:"/AuthorizationSystem/ModifyPassword.aspx"
                });
            });
            //个性菜单点击事件
            $("#oMenu").click(function() {
                //开发配置
                var address = '/';// "http://localhost:62886/";
                //测试服务器
                //var address = "http://192.168.1.12:8090/";
                //正式服务器
                //var address = "http://192.168.1.12/";
                //alert($(domEle).text());
                document.getElementById('ifmMain').contentWindow.addTab("个性菜单设置", address + "Menu.html?userId=<%=LoginHelper.UserID%>");
            });

            if(hdCollection.Get("wtype")=='0'){
                $('.imgLogo').css('background-image','url("/Images/0jhs.png")');
            }
            else if(hdCollection.Get("wtype")=='1'){
                $('.imgLogo').css('background-image','url("/Images/0DBS.png")');
            }
            else if(hdCollection.Get("wtype")=='2'){
                $('.imgLogo').css('background-image','url("/Images/0DXS.png")');
            }
            else if(hdCollection.Get("wtype")=='4'){
                $('.imgLogo').css('background-image','url("/Images/0XTJK.png")');
            }
        })
    </script>
    <script type="text/javascript">
        $(document).ready(function() {
            $('#YinChang').on('click', function () { 
                $('#LeftMenuNControl1').hide();
            });
            if(hdCollection.Get("uid")=='99998')
            {
                $("#ifmMain").attr("src","AuthorizationSystem/ChaKanRZ.aspx");
            }
            else if(hdCollection.Get("wtype")=='4')
            {
                $("#ifmMain").attr("src","");
            }
            // document.getElementById("ifmMain").src = "BusinessInformation/DaiChuL/DaiChuL.aspx";            
            //setInterval(loglinkserver,120000);
        });

    </script>
     
    <script type="text/javascript">
        
        //记录与服务器的连通
        function loglinkserver(){
            ASPxCallback1.PerformCallback("loglink");
        }
        function ASPxCallback1Complete(rs) {
            var arr = rs.split('|');
            var type = arr[0];
            var state = arr[1];
            var specialIdentity = arr[2];            
            var msg = arr[3].split('-');
            if (msg[0] == 'True') {
                alert(msg[1]);
            }
            hdCollection.Set("type", type);
            if (state == 'True') {
                
            }
            else {
                //服务器异常,清除循环器
                clearInterval(0);
                
            }
        }
    </script>
     
</head>
<body  style="  height: 100%">
 
    <div class="ui-layout-north" style="padding-bottom: 0px">
<div class="header"  > 
    <div class="imgLogo" id="imgLogo"  >
        <div  class="outSpaceLogin">
            <div class="divLogin" >
                <span class="spLogin" >
                    <%= HttpContext.Current.Session["_UserName"] %>  
                </span>
                <span id="oInfo" class="spLogin" style="cursor:pointer;text-decoration:underline;margin-left:5px">
                    单位信息 
                </span>
                <span id="oPass" class="spLogin" style="cursor:pointer;text-decoration:underline;margin-left:5px">
                    修改密码
                </span>
                <span id="oMenu" class="spLogin" style="cursor:pointer;text-decoration:underline">
                    个性菜单
                </span>
            </div>
            <%--<span id="spTime" class="spTime">
                        <%=DateTime.Now.Date.ToString("yyyy/MM/dd") %></span>--%>
            <%--<span class="exit" title="退出" onclick="wOpen()"></span>--%>
            <div class="spTuiChu"  >
                <span class="exit" title="退出" onclick="wOpen()"></span>
            </div>
        </div>
        <form runat="server">
            <dx:ASPxHiddenField ID="hdCollection" ClientInstanceName="hdCollection" runat="server"></dx:ASPxHiddenField>
            <dx:ASPxCallback ID="ASPxCallback1" ClientInstanceName="ASPxCallback1" runat="server" OnCallback="ASPxCallback1_Callback" ClientSideEvents-CallbackComplete="function(s,e){ASPxCallback1Complete(e.result);}"></dx:ASPxCallback>
        <dx:ASPxButton ID="btnLogOut" ClientInstanceName="btnLogOut" runat="server" Text="ASPxButton" ClientVisible="false" OnClick="btnLogOut_Click"></dx:ASPxButton>
            </form>
    </div> 

</div>
 </div>
  <div class="ui-layout-west">
<uc1:LeftMenuNControl ID="LeftMenuNControl1" runat="server" />
      </div>
 <div class="ui-layout-center">
<%----<div id="divMain" class="divMain helf"  >--%>
    <iframe id="ifmMain"  frameborder="0" class="ifmMain"  src="Main.html" style=" ">

    </iframe>
  
<%----</div> --%>
      </div>
<%--  <div class="footer"     style=" background-color: red" background-color:Red >--%>
<%--        <div class="cpRt" style=" width: 100%" align="center">--%>
<%--            由&nbsp;上海三高计算机中心股份有限公司&nbsp;提供技术支持--%>
<%--        </div>--%>
<%--    </div>--%>
</body>
</html>